<template>
  <div class="id-card-container">
    <div class="id-card">
      <div class="card-header">
        <h1>爱情心理学教师执业认证</h1>
        <div class="decorative-line"></div>
      </div>
      <div class="card-body">
        <div class="left-section">
          <div class="info-item">
            <span class="label">姓　名</span>
            <span class="value">林心语</span>
          </div>
          <div class="info-item">
            <span class="label">编　号</span>
            <span class="value">LX-2025-5200</span>
          </div>
          <div class="info-item">
            <span class="label">职　级</span>
            <span class="value gold-badge">首席情感导师</span>
          </div>
          <div class="info-item">
            <span class="label">有效期</span>
            <span class="value">2025.05 - 2028.05</span>
          </div>
        </div>
        <div class="right-section">
          <div class="qr-code">
            <img src="../assets/1.png" alt="认证二维码">
          </div>
          <div class="archive-icon">💞</div>
          <div class="tag-fall"></div>
        </div>
      </div>
      <div class="card-footer">
        <div class="info-row">
          <div class="info-item">
            <span class="label">所属机构</span>
            <span class="value">国际情感研究院</span>
          </div>
          <div class="info-item">
            <span class="label">咨询专线</span>
            <span class="value">0571-5200 1314</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<style scoped>
.id-card-container {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(214,51,132,0.15); /* 粉紫阴影 */
}

.id-card {
  background: linear-gradient(145deg, #fff0f5 0%, #ffe4e1 100%); /* 浅粉渐变 */
  border: 2px solid #d63384; /* 粉紫色边框 */
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.card-header h1 {
  color: #8a2be2; /* 紫罗兰色 */
  font-family: '方正兰亭黑', '微软雅黑', sans-serif;
  font-size: 2.2em;
  text-align: center;
  padding: 15px 0;
  letter-spacing: 2px;
  text-shadow: 1px 1px 2px rgba(138,43,226,0.1);
}

.decorative-line {
  background: linear-gradient(90deg, #e83e8c, #d63384); /* 粉紫渐变 */
  height: 3px;
  margin: 0 30px;
}

.card-body {
  display: flex;
  padding: 20px;
}

.left-section {
  flex: 2;
  padding-right: 20px;
}

.info-item {
  margin: 12px 0;
  display: flex;
  align-items: center;
}

.label {
  color: #d63384; /* 主粉紫色 */
  font-size: 1.1em;
  min-width: 80px;
  letter-spacing: 1px;
}

.value {
  color: #2c3e50;
  font-weight: 500;
  font-size: 1.2em;
}

.gold-badge {
  color: #8a2be2; /* 紫罗兰色 */
  text-shadow: 0 2px 4px rgba(138,43,226,0.2);
}

.right-section {
  flex: 1;
  position: relative;
}

.qr-code {
  border: 2px solid #e83e8c; /* 粉红边框 */
  border-radius: 8px;
  padding: 8px;
  background: white;
  box-shadow: 0 4px 6px rgba(232,62,140,0.3);
}

.qr-code img {
  width: 100%;
  height: auto;
}

.archive-icon {
  position: absolute;
  bottom: 15px;
  right: 15px;
  font-size: 48px;
  transform: rotate(-10deg);
  opacity: 0.8;
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
}

.tag-fall {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #e83e8c; /* 辅粉色 */
  clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
  animation: tagFall 3s infinite;
}

@keyframes tagFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 0; }
  50% { transform: translateY(10px) rotate(180deg); opacity: 1; }
  100% { transform: translateY(40px) rotate(360deg); opacity: 0; }
}

.card-footer {
  padding: 15px 20px;
  border-top: 1px dashed #e83e8c; /* 粉红虚线 */
  margin-top: 15px;
}

.info-row {
  display: flex;
  justify-content: space-between;
}

.id-card::after {
  content: '';
  position: absolute;
  top: 15%;
  left: 10%;
  width: 80%;
  height: 80%;
  background: url('../assets/1.png') no-repeat;
  opacity: 0.08;
  z-index: 0;
}
</style>